<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组的join()方法</title>
    
</head>
<body>
    <script type="text/javascript">
        var arr = [1, 2, 3, 4];
        var a = arr.toString();
        var b = arr.toLocaleString();
        console.log(a);
        console.log(b);
        // 分割字符串
        console.log(arr.join('-'))

    </script>
</body>
</html>